package com.tiantianyuegou.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;
import java.util.List;

public class FragmentAdapter extends FragmentPagerAdapter {

	List<Fragment> allfragment = new ArrayList<Fragment>();

	public FragmentAdapter(FragmentManager fm, List<Fragment> allfragment) {
		super(fm);
		this.allfragment = allfragment;
	}

	@Override
	public Fragment getItem(int position) {
		return allfragment.get(position);
	}

	@Override
	public int getCount() {
		return allfragment.size();
	}

}
